<?php

namespace app\api\controller\cate;

use think\Controller;
use think\Request;

class Cate extends Controller {
    public function index() {
        $typeid = $this->request->param('typeid', 0);
        // halt($typeid);
        $list = model('Product.Product')->where('typeid', $typeid)->select();
        if (!$list) {
            $this->error('该分类暂无商品');
        }
        $this->success('查询成功', null, $list);

    }
}
